and the compilation stops. The same program would compile fine on a non-NeXT c++ compiler. What's the problem?\
\
A:
\fc0 There is indeed a bug in the current C++ compiler, but the workaround is easy.\
\
The problem is with the declaration:\
\
\f2\fs24 typedef enum \{\
aaa,\
bbb,\
ccc\
\} Type;
\f0\fs28 \
\
This causes problems with C++'s name mangling, since this enum has no tag. The current compiler does not know how to encode this type, so it simply uses an integer for the number of the unencodable type. There is no reason to think that this will match the encoding used in some other file which may have had a different number of unencodable types or the same types but in a different order. This is indeed what was happening in your case, and explains why the link failed.\
\
You should just use this declaration instead:\
\
\f2\fs24 enum Type \{\
aaa,\
bbb,\
ccc\
\};\
\f0\fs28 \
In C++, a typedef is automatically published for each struct, union, or enum with the same name as the tag, so you can continue to use "Type" rather than "enum Type".\
\
This bug will be fixed in a future release of the C++ compiler.\